Data type rules
Simple checks for individual columns.
Rule types
Empty check
Rule type: EMPTYCHECK
Description: Checks whether or not the target column has empty values.
Null check
Rule type: NULLCHECK
Description: Checks whether or not the target column has NULL values.
Date check
Rule type: DATECHECK
Description: Checks whether or not the target column has only DATE values.
Integer check
Rule type: INTCHECK
Description: Checks whether or not the target column has only INTEGER values.
Double check
Rule type: DOUBLECHECK
Description: Checks whether the target column has only DOUBLE values or not.
String check
Rule type: STRINGCHECK
Description: Checks whether the target column has only STRING values or not.
Mixed datatype check
Rule type: DATATYPECHECK
Description: Checks whether the target column has values with different data types, such as DATE, INTEGER, DOUBLE, and STRING.
Syntax
- <rule_type> - Fixed key to the rule type
- <column_name> - Column to apply the rule
- <rule_name> - Custom name of the rule
opt.dataset = "example_ds"
val rule = OwlUtils.createRule(opt.dataset)
rule.setRuleNm("<rule_name>")
rule.setRuleValue("<column_name>")
rule.setRuleType("<rule_type>")
rule.setPerc(1.0)
rule.setPoints(1)
rule.setIsActive(1)
rule.setUserNm("admin")